{include file="header.html"}
<link rel="stylesheet" href="{url('/style/css/yiyuanbao.css')}">
{include file="ur_here.html"}
<div class="g-wrap g-body">
<div class="m-list">
<div class="g-body-hd f-clear">
    <div class="m-list-classification">
        <div class="m-classification">
            <div class="m-classi">分类</div>
            <div class="m-fication">
                <ul>
                    <li {if !$smarty.get.cid}class="current"{/if}><a href="{'/yunbuy'|url}?bid={$smarty.get.bid}&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}">全部</a></li>
                    {foreach from=$yuncat item=m}
                    {if $m.ismenu eq 1 && $m.parentid eq 0}
                    <li {if $smarty.get.cid eq $m.id}class="current"{/if}><a href="{'/yunbuy'|url}?cid={$m.id}&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}" title="{$m.catname}">{$m.catname}</a></li>
                    {/if}
                    {/foreach}
                </ul>
                <a href="javascript:;" class="expansion"></a>
            </div>
        </div>

        {if $brand}
        <div id="dlBrandBox" class="m-classification">
            <div class="m-classi">品牌</div>
            <div class="m-fication">
                <ul id="ulBrandList">
                    <li {if !$smarty.get.bid}class="current"{/if}><a href="{'/yunbuy'|url}?cid={$smarty.get.cid}&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}" title="全部">全部</a></li>
                    {foreach from=$brand item=m}
                    <li {if $smarty.get.bid eq $m.id}class="current"{/if}><a href="{'/yunbuy'|url}?bid={$m.id}&cid={$smarty.get.cid}&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}" title="{$m.catname}">{$m.catname}</a></li>
                    {/foreach}
                </ul>
                <div class="one_more">
                    <a href="javascript:;" class="om1">展开<i></i></a>
                    <a href="javascript:;" class="om2">收起<i></i></a>
                </div>
            </div>
        </div>
        {/if}
    </div>
</div>
<div class="g-wrap g-body-bd f-clear">
<div class="m-list-mod m-list-goodsList" style="overflow: hidden">
<div class="m-list-mod-hd">
    <h6>排序：</h6>
    <ul class="m-list-sortList">
        <li {if $smarty.get.k eq buy_num}class="selected"{/if}>
            <a href="{'/yunbuy/'|url}?cid={$cid}&bid={$bid}&k=buy_num&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}">人气{$L.unit_price}</a>
        </li>
        <li {if $smarty.get.k eq end_num}class="selected"{/if}><a href="{'/yunbuy/'|url}?cid={$cid}&bid={$bid}&k=end_num&s=asc&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}">剩余人次</a>
        </li>
        <li {if $smarty.get.k eq add_time}class="selected"{/if}><a href="{'/yunbuy/'|url}?cid={$cid}&bid={$bid}&k=add_time&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}">最新{$L.unit_price}</a>
        </li>
        <li {if $smarty.get.k eq need_num && $smarty.get.s eq desc}class="selected"{/if}><a href="{'/yunbuy/'|url}?cid={$cid}&bid={$bid}&k=need_num&s=desc&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}">总需人次<i class="ico ico-arrow-sort ico-arrow-sort-gray-down" title="降序"></i></a>
        </li>
        <li {if $smarty.get.k eq need_num && $smarty.get.s eq asc}class="selected"{/if}><a href="{'/yunbuy/'|url}?cid={$cid}&bid={$bid}&k=need_num&s=asc&type={$smarty.get.type}&{if $smarty.get.zq}&zq={$smarty.get.zq}{/if}">总需人次<i class="ico ico-arrow-sort ico-arrow-sort-gray-up" title="升序"></i></a>
        </li>
    </ul>
</div>
<div class="m-list-mod-bd">
<ul class="w-quickBuyList f-clear">
    {foreach from=$list item=m name=list}
    {include file="yunbuy/lbi_yunbuy.html"}
    {foreachelse}
    <p class="empty">产品正在上架</p>
    {/foreach}
    {if $listNo < 4 && $listNo > 0}
    {for $foo=1 to $listNo}
    <li class="w-quickBuyList-item blank"></li>
    {/for}
    {/if}
</ul>
</div>
</div>
<div class="m-list-pager">
    {include file="public_page.html"}
</div>
{literal}
<script type="text/javascript">
    $(function(){
        $(".w-number-btn-plus").click(function(){
           var max = $(this).parent().children('input.w-number-input').attr('data-max');
           var qty = $(this).parent().children('input.w-number-input').val()*1;
            if(qty < max){
                $(this).parent().children('input.w-number-input').val(qty+1);
            }
        });
        $(".w-number-btn-minus").click(function(){
            var qty = $(this).parent().children('input.w-number-input').val()*1;
            if(qty>1){
                $(this).parent().children('input.w-number-input').val(qty-1);
            }
        });
        $(".w-number-input").blur(function(){
            var max = $(this).attr('data-max')*1;
            if($(this).val()>max){
                $(this).val(max);
            }
        });
    });
</script>
{/literal}
<div class="m-list-mod m-list-freeList">
    <div class="w-hd">
        <h3 class="w-hd-title">{$L.unit_yun}体验区</h3>
        <a class="w-hd-more" href="{url('/yunbuy/free')}">去体验专区看看！</a>
    </div>
    <div class="m-list-mod-bd">
        <ul class="w-goodsList f-clear">
            {foreach from=$free_list item=m}
            <li class="w-goodsList-item row-first">
                <div class="w-goods w-goods-briefFree">
                    <div class="w-goods-pic scrollLoadingDiv"><img class="zjf" height="55" src="/style/images/daz.png" width="47" /><a href="{'/yunbuy/detail/'|cat:$m.buy_id|url}" target="_blank" title="{$m.title}"><img alt="{$m.title}" class="scrollLoading" src="/style/images/pix.gif" data-url="{zz mod=fileurl source=$m.imgurl_src width=210 height=130 type=0}"></a></div>
                    <p class="w-goods-title f-txtabb">
                        <a href="{'/yunbuy/detail/'|cat:$m.buy_id|url}" target="_blank" title="{$m.title}">(第{$m.qishu}期){$m.title}</a></p>
                    <p class="w-goods-price">总需：{$m.need_num} 人次</p>
                    <p>参与 <b class="txt-gray">{$m.buy_num}</b> 人次，</p>
                    <p>还剩 <b class="txt-blue">{$m.end_num}</b> 人次</p>
                    <div class="w-goods-opr1"><a href="{'/yunbuy/detail/'|cat:$m.buy_id|url}" style="" target="_blank">详情&gt; </a></div>
                </div>
            </li>
            {/foreach}
        </ul>
    </div>
</div>
</div>
</div>
</div>
{include file="footer.html"}
<script type="text/javascript">
    $('.w-quickBuyList-item').bind('mouseover',function(){
        $(this).addClass('hover');
    }).bind('mouseout',function(){
        $(this).removeClass('hover');
    });
    $(function(){
        if($('#ulBrandList').height() <= '56'){
            $('.one_more').hide();
        }
    })
    $('.one_more .om1').click(function(){
        $('#dlBrandBox').css('height','auto');
        $(this).hide();
        $('.one_more .om2').show();
    })
    $('.one_more .om2').click(function(){
        $('#dlBrandBox').css('height','74px');
        $(this).hide();
        $('.one_more .om1').show();
    })
</script>